import React from 'react'
import { Routes, Route } from 'react-router-dom'
import { constRoutes } from './routes'

// 路由组件
const Router = () => {
  return (
    <Routes>
      {/* 路由渲染 */}
      {constRoutes.map((v, i) => {
        return <Route path={v.path} element={v.element} key={i}></Route>
      })}
    </Routes>
  )
}

export default Router
